package com.yx.cloud.product.laser.tuyapublic;

import android.graphics.Bitmap;
import com.iot.product.sweeper.bean.MapInfo;
import com.iot.product.sweeper.bean.Room;
import java.util.HashSet;
import java.util.List;

public class TuyaLaserMap extends MapInfo {
    public float x_min;
    public float y_min;
    public float mul;
    public float top;
    public float left;
    public double dockerPosX;
    public double dockerPosY;
    public double dockertheta;
    private Bitmap bitmap;
    public int byteStart = 0;

    //LF独有
    public String oldMapData = null;
    public String oldAreaData = null;
    public String oldRoomData = null;
    public String oldForbidenLineData = null;
    public String oldForbidenAreaData = null;
    public List<Room> room = null; //房间分区信息
    public long autoAreaId;
    //标志地图是否是分区地图
    public HashSet<Integer> roomsId = null;
    public byte[] tempRoomData = null;
    public HashSet<Integer> oldRoomsId = null;

    public List<Room> getRoom() {
        return room;
    }

    public void setRoom(List<Room> room) {
        this.room = room;
    }

    public Bitmap getBitmap() {
        return bitmap;
    }

    public synchronized void setBitmap(Bitmap newBitmap) {
        if (bitmap != null && !bitmap.isRecycled()) {
            bitmap.recycle();
        }
        this.bitmap = newBitmap;
    }

    public synchronized Bitmap copyBitmap() {
        if (bitmap == null || bitmap.isRecycled()) {
            return null;
        }
        return bitmap.copy(Bitmap.Config.ARGB_8888, true);
    }
}
